#  author:张靖昆 date:2020/3/10 name:test IDE:PyCharm

import datetime
import calendar
# 1.计算你已经活了多少天了
now_day = datetime.datetime.today().date()
bir_day = datetime.datetime.strptime("1997-12-25",'%Y-%m-%d').date()
days_01 = now_day - bir_day
print ("我已经活了",days_01.days,"天")

# 2.计算100天后是周几
now_day_01 = datetime.datetime.today().date()
time_01 = now_day_01 - datetime.timedelta(days=-100)
print(time_01)
time_02 = calendar.weekday(time_01.year,time_01.month,time_01.day)
if time_02 == 0 :
    print("那天是星期一")
elif time_02 == 1 :
    print("那天是星期二")
elif time_02 == 2:
    print("那天是星期三")
elif time_02 == 3 :
    print("那天是星期四")
elif time_02 == 4 :
    print("那天是星期五")
elif time_02 == 5 :
    print("那天是星期六")
elif time_02 == 6 :
    print("那天是星期日")

